import { Application } from 'egg';

export default (app: Application) => {
    const { STRING, CHAR } = app.Sequelize;
    const model = app.model.define('School', {
        school_id: { type: CHAR(32), primaryKey: true },//主键
        school_name: STRING(32),//学校名
        school_badge: STRING(50),//校徽
        school_status: CHAR(1),//状态（1：启用，2：停用）
        created_by: CHAR(32),//创建人
        updated_by: CHAR(32),//更新人
        is_delete: CHAR(1),//标识是否删除
    }, { tableName: 't_school' });
    return model;
};

export class School {
    school_id: string;
    school_name: string;
    school_badge: string;
    school_status: string;
    created_by: string;
    updated_by: string;
    is_delete: string;
}